import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isGroupUsers: false,
    location: '',
    validProvinceList: [],
    currentMapOne: [],
    currentMapTwo: [],
  },
  getters: {
    getIsGroupUsers: state => state.isGroupUsers,
    getLocation: state => state.location,
    getValidProvinceList: state => state.validProvinceList,
    getCurrentMapOne: state => state.currentMapOne,
    getCurrentMapTwo: state => state.currentMapTwo,
  },
  mutations: {
    setIsGroupUsers(state, isGroupUsers){
      state.isGroupUsers = isGroupUsers
    },
    setLocation(state, location){
      state.location = location
    },
    setValidProvinceList(state, validProvinceList){
      state.validProvinceList = validProvinceList
    },
    setCurrentMapOne(state, currentMapOne){
      state.currentMapOne = currentMapOne
    },
    setCurrentMapTwo(state, currentMapTwo){
      state.currentMapTwo = currentMapTwo
    }
  }
})
